package a2_linkedlist.doublelinkedlist;
/**
 * 节点类，一个节点存放一个元素的值、前驱、后继
 */
public class Node {
    //保存上一个车厢的地址
    Node prev;
    //存放具体数据
    int val;
    //保存下一个车厢的地址
    Node next;

    public Node(int val) {
        this.val = val;
    }

    public Node(Node prev, int val, Node next){
        this.prev = prev;
        this.val = val;
        this.next = next;
    }
}